<?php
/**
 * Created by PhpStorm.
 * User: alexey
 * Date: 7/29/14
 * Time: 10:42 PM
 */

namespace util;

include_once("Logger.php");

class FileLogger extends Logger
{

  private static $outputFile = null;

  static function getOutputFile()
  {
    return self:: $outputFile;
  }

  static function setOutputFile($out)
  {
    self::$outputFile = $out;
  }

  function info($message)
  {
    $outputMessage = "[INFO] ";
    $outputMessage .= date("[d.m.y] [H:i:s] ");
    $outputMessage .= $message;
    return $outputMessage;
  }

  function error($message)
  {
    $outputMessage = "[ERROR] ";
    $outputMessage .= date("[d.m.y] [H:i:s] ");
    $outputMessage .= $message;
    return $outputMessage;
  }

  protected function write($message)
  {
    //@todo: write to file
  }
}